﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;

namespace HelperClasses
{
    class CheckBoxYN : INotifyPropertyChanged 
    {

        public CheckBoxYN()
        {
            _checked = true;
            NotifyPropertyChanged("Checked");
        }

        private Boolean _checked = false;
        public Boolean Checked
        {
            get
            {
                return _checked;
            }
            set
            {
                _checked = value;
                NotifyPropertyChanged("Checked");
            }
        }

        private void NotifyPropertyChanged(string name)
        {
            if (PropertyChanged != null)
            {

                PropertyChanged(this, new PropertyChangedEventArgs(name));

            }

        }

        public event PropertyChangedEventHandler PropertyChanged;
    }
}
